home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 9 / developer source - volume 9.iso / parad / may96 / clemf104.gif < prev    next >
Graphics Interchange Format  |  1998-02-10  |  10KB  |  518x461  |  4-bit (5 colors)
Labels: text | electronics | screenshot | display | software | computer | computer icon | operating system | number | web page
OCR: FIND_AGE.FSL :: Grade_School_UI_Button :: Determine_Age* method Determine_Age(const DateOfBirth Date, const AgeOnThisDay Date) SmallInt var Age SmallInt endvar ; Implement the algorithm here ; This produces the person's age on their birthday Age = year (AgeOnThisDay) - year (DateOfBirth) ; Subtract 1 if date in question is before the birthday if month (AgeOnThisDay) < month (DateOfBirth) then Age = Age - 1 else if month (AgeOnThisDay) = month (DateOfBirth) and day ( AgeOnThisDay) < day (DateOfBirth) then Age = Age - 1 endif endif return Age endmethod Edit Line: 1 Col: 1